package com.company.store;

import com.company.factory.SimplePizzaFactory;
import com.company.pojo.Pizza;
import com.company.pojo.concrete.CheesePizza;
import com.company.pojo.concrete.ClamPizza;
import com.company.pojo.concrete.VeggiePizza;

/**
 * 披萨店
 */
public class PizzaStore {

    SimplePizzaFactory factory;

    public PizzaStore(SimplePizzaFactory factory) {
        this.factory = factory;
    }

    public void orderPizza(String type) {
        Pizza pizza = factory.createPizza(type);

        pizza.serveStep();
    }

}
